<nav class="navbar navbar-default">
      <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
          <button aria-expanded="false" data-target="#bs-example-navbar-collapse-1" data-toggle="collapse" class="navbar-toggle collapsed" type="button">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a href="/" class="navbar-brand">比特博士</a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div id="bs-example-navbar-collapse-1" class="collapse navbar-collapse">
          <ul class="nav navbar-nav">
            <li class="active"><a href="/">行情中心<span class="sr-only">(current)</span></a></li>
            <li><a href="/user">账户管理</a></li>
          </ul>
          <ul class="nav navbar-nav navbar-right">
            <?php if(empty($user_info)){?>
              <li><a href="/reg">注册</a></li>
              <li><a href="/login">登陆</a></li>
            <?php }else{?>
              <li class="dropdown">
                <a aria-expanded="false" aria-haspopup="true" role="button" data-toggle="dropdown" class="dropdown-toggle" href="#">UID: <?php echo $user_info['uid'];?> <span class="caret"></span></a>
                <ul class="dropdown-menu">
                  <li><a href="#">安全设置</a></li>
                  <li class="divider" role="separator"></li>
                  <li><a href="/login/loginout">退出</a></li>
                </ul>
              </li>
            <?php }?>
          </ul>
        </div><!-- /.navbar-collapse -->
      </div><!-- /.container-fluid -->
    </nav>